package com.xu.service;

import com.xu.mapper.InMapper;
import com.xu.pojo.Detail;
import com.xu.pojo.Invitation;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("inService")
public class InServiceImpl implements InService {
    @Resource
    private InMapper inMapper;
    //查询所有的帖子表
   public List<Invitation> getallin(){
       return inMapper.getallin();
   };

    //模糊查询

  public   List<Invitation> likebytitle(String title){

      if (title!=null&&title!=""){
          title = "%"+title+"%";

      }
      return inMapper.likebytitle(title);

  };

    //  查看回复


  public   List<Detail> getbyid( Integer id){
      return  inMapper.getbyid(id);
  };
    //删除
  public   int delInvi(Integer id){
      return inMapper.delInvi(id);
  };
}
